VERSION 5.00
Begin VB.Form frmmain 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Parasites Peter"
   ClientHeight    =   1110
   ClientLeft      =   45
   ClientTop       =   375
   ClientWidth     =   5685
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1110
   ScaleWidth      =   5685
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox mp 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   495
      Left            =   0
      ScaleHeight     =   495
      ScaleWidth      =   1215
      TabIndex        =   2
      Top             =   0
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.CommandButton myCom 
      Caption         =   "Transform"
      Height          =   375
      Left            =   4320
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
   Begin VB.TextBox tex 
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5415
   End
End
Attribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    Me.OLEDropMode = 1
    tex.OLEDragMode = 1
End Sub

Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    tex.Text = Data.Files(1)
End Sub

Private Sub myCom_Click()
    If LCase(Right(tex.Text, 3)) = "bmp" Then
        mp.AutoSize = True
        mp.Picture = LoadPicture(tex.Text)
        mp.AutoRedraw = True
    ElseIf LCase(Right(tex.Text, 5)) = "peter" Then
        mp.AutoRedraw = True
        
    Else
        MsgBox "Error!", vbExclamation, "Error"
    End If
End Sub

Private Sub tex_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    tex.Text = Data.Files(1)
End Sub
